
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>基础组件 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="form.html" />
    
    
    <link rel="prev" href="container.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../introduction/environment.html">
            
                <a href="../introduction/environment.html">
            
                    
                    环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../introduction/hello.html">
            
                <a href="../introduction/hello.html">
            
                    
                    HelloWorld
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../introduction/dev-and-debug.html">
            
                <a href="../introduction/dev-and-debug.html">
            
                    
                    开发与调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    参考
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../framework/file.html">
            
                <a href="../framework/file.html">
            
                    
                    文件组织
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../framework/manifest.html">
            
                <a href="../framework/manifest.html">
            
                    
                    manifest文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../framework/nml.html">
            
                <a href="../framework/nml.html">
            
                    
                    nml文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../framework/page.html">
            
                <a href="../framework/page.html">
            
                    
                    页面与组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    组件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="general.html">
            
                <a href="general.html">
            
                    
                    通用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="container.html">
            
                <a href="container.html">
            
                    
                    容器组件
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.3" data-path="basics.html">
            
                <a href="basics.html">
            
                    
                    基础组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="form.html">
            
                <a href="form.html">
            
                    
                    表单组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="media.html">
            
                <a href="media.html">
            
                    
                    媒体组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    接口
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../api/general.html">
            
                <a href="../api/general.html">
            
                    
                    通用规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../api/basic.html">
            
                <a href="../api/basic.html">
            
                    
                    基本功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../api/interface.html">
            
                <a href="../api/interface.html">
            
                    
                    界面交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../api/request.html">
            
                <a href="../api/request.html">
            
                    
                    网络访问
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../api/storage.html">
            
                <a href="../api/storage.html">
            
                    
                    文件数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../api/system.html">
            
                <a href="../api/system.html">
            
                    
                    系统能力
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../api/media.html">
            
                <a href="../api/media.html">
            
                    
                    图形图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../api/service.html">
            
                <a href="../api/service.html">
            
                    
                    厂商服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../api/third.html">
            
                <a href="../api/third.html">
            
                    
                    第三方服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >基础组件</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x57FA;&#x7840;&#x7EC4;&#x4EF6;">&#x57FA;&#x7840;&#x7EC4;&#x4EF6;</h2>
<h3 id="a">a</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x8D85;&#x94FE;&#x63A5;&#xFF08;&#x9ED8;&#x8BA4;&#x4E0D;&#x5E26;&#x4E0B;&#x5212;&#x7EBF;&#xFF09;&#x3002;</p>
<p>&#x6587;&#x672C;&#x5185;&#x5BB9;&#x5199;&#x5728;&#x6807;&#x7B7E;&#x5185;&#x5BB9;&#x533A;&#xFF0C;&#x652F;&#x6301;&#x8F6C;&#x4E49;&#x5B57;&#x7B26;&quot;&quot;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4EC5;&#x652F;&#x6301;<code>&lt;span&gt;</code>&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">href</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x652F;&#x6301;&#x7684;&#x683C;&#x5F0F;&#x53C2;&#x89C1;&#x9875;&#x9762;&#x8DEF;&#x7531;&#x4E2D;&#x7684;uri&#x53C2;&#x6570;&#x3002;&#x989D;&#x5916;&#x7684;&#x8BF7;&#x53C2;&#x8003; href &#x53C2;&#x6570;&#x8BF4;&#x660E;&#x3002;</td>
</tr>
</tbody>
</table>
<p>href &#x53C2;&#x6570;&#x8BF4;&#x660E;</p>
<ul>
<li>href&#x8FD8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&quot;?param1=value1&quot;&#x7684;&#x65B9;&#x5F0F;&#x6DFB;&#x52A0;&#x53C2;&#x6570;&#xFF0C;&#x53C2;&#x6570;&#x53EF;&#x4EE5;&#x5728;&#x9875;&#x9762;&#x4E2D;&#x901A;&#x8FC7;this.param1&#x7684;&#x65B9;&#x5F0F;&#x4F7F;&#x7528;</li>
<li>href&#x8FD8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&quot;?param1=value1&quot;&#x7684;&#x65B9;&#x5F0F;&#x6DFB;&#x52A0;&#x53C2;&#x6570;&#xFF0C;&#x53C2;&#x6570;&#x53EF;&#x4EE5;&#x5728;&#x9875;&#x9762;&#x4E2D;&#x901A;&#x8FC7;this.param1&#x7684;&#x65B9;&#x5F0F;&#x4F7F;&#x7528;</li>
</ul>
<p>&#x793A;&#x4F8B;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;About?param1=value1&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;/about?param1=value1&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">&quot;http://www.example.com/?param1=value1&quot;</span>&gt;</span>
</code></pre>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;<code>&lt;text&gt;</code>&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<h3 id="image">image</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x6E32;&#x67D3;&#x56FE;&#x7247;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">src</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x56FE;&#x7247;&#x7684;uri&#xFF0C;&#x540C;&#x65F6;&#x652F;&#x6301;&#x672C;&#x5730;&#x548C;&#x4E91;&#x7AEF;&#x8DEF;&#x5F84;&#xFF0C;&#x652F;&#x6301;&#x7684;&#x56FE;&#x7247;&#x683C;&#x5F0F;&#x5305;&#x62EC;&#x9759;&#x6001;&#x7C7B;&#x578B;&#xFF08;png, jpg&#xFF09;&#x548C;&#x52A8;&#x6001;&#x7C7B;&#x578B;&#xFF08;gif&#xFF09;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">alt</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x52A0;&#x8F7D;&#x65F6;&#x663E;&#x793A;&#x7684;&#x5360;&#x4F4D;&#x56FE;&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">resize-mode</td>
<td style="text-align:left">cover&#x3001;contain&#x3001;stretch&#x3001;center</td>
<td style="text-align:left">cover</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x56FE;&#x7247;&#x7684;&#x7F29;&#x653E;&#x7C7B;&#x578B;</td>
</tr>
</tbody>
</table>
<p>resize-mode &#x7C7B;&#x578B;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">cover</td>
<td style="text-align:left">&#x4FDD;&#x6301;&#x5BBD;&#x9AD8;&#x6BD4;&#x7F29;&#x5C0F;&#x6216;&#x653E;&#x5927;&#xFF0C;&#x4F7F;&#x5F97;&#x4E24;&#x8FB9;&#x90FD;&#x5927;&#x4E8E;&#x6216;&#x7B49;&#x4E8E;&#x663E;&#x793A;&#x8FB9;&#x754C;&#xFF0C;&#x5C45;&#x4E2D;&#x663E;&#x793A;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">contain</td>
<td style="text-align:left">&#x4FDD;&#x6301;&#x5BBD;&#x9AD8;&#x6BD4;&#xFF0C;&#x7F29;&#x5C0F;&#x6216;&#x8005;&#x653E;&#x5927;&#xFF0C;&#x4F7F;&#x5F97;&#x56FE;&#x7247;&#x5B8C;&#x5168;&#x663E;&#x793A;&#x5728;&#x663E;&#x793A;&#x8FB9;&#x754C;&#x5185;&#xFF0C;&#x5C45;&#x4E2D;&#x663E;&#x793A;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">stretch</td>
<td style="text-align:left">&#x4E0D;&#x4FDD;&#x5B58;&#x5BBD;&#x9AD8;&#x6BD4;&#xFF0C;&#x586B;&#x5145;&#x6EE1;&#x663E;&#x793A;&#x8FB9;&#x754C;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">center</td>
<td style="text-align:left">&#x5C45;&#x4E2D;&#xFF0C;&#x65E0;&#x7F29;&#x653E;&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<h3 id="progress">progress</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x8FDB;&#x5EA6;&#x6761;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">percent</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5F53;&#x524D;&#x8FDB;&#x5EA6;(type&#x4E3A;circular&#x65F6;&#x4E0D;&#x751F;&#x6548;)</td>
</tr>
<tr>
<td style="text-align:left">type</td>
<td style="text-align:left">horizontal&#x3001;circular</td>
<td style="text-align:left">horizontal</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x8FDB;&#x5EA6;&#x6761;&#x7C7B;&#x578B;&#xFF0C;&#x4E0D;&#x652F;&#x6301;&#x52A8;&#x6001;&#x4FEE;&#x6539;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>horizontal progress &#x5E95;&#x8272;&#x4E3A; <code>#f0f0f0</code>&#x3002;</p>
<p>circular progress &#x9ED8;&#x8BA4;&#x5BBD;&#x9AD8;&#x4E3A;32px&#xFF0C;&#x5BBD;&#x9AD8;&#x8BBE;&#x7F6E;&#x4E0D;&#x4E00;&#x81F4;&#x65F6;&#xFF0C;circular&#x56FE;&#x6807;&#x4E3A;&#x5BBD;&#x9AD8;&#x7684;&#x8F83;&#x5C0F;&#x503C;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">#33b4ff &#x6216;&#x8005; rgb(51, 180, 255)</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x8FDB;&#x5EA6;&#x6761;&#x7684;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">stroke-width</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">32px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x8FDB;&#x5EA6;&#x6761;&#x7684;&#x5BBD;&#x5EA6;(type&#x4E3A;circular&#x65F6;&#x4E0D;&#x751F;&#x6548;)</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<h3 id="span">span</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x683C;&#x5F0F;&#x5316;&#x7684;&#x6587;&#x672C;&#xFF0C;&#x53EA;&#x80FD;&#x4F5C;&#x4E3A;<code>&lt;text&gt;</code>&#x4E0E;<code>&lt;a&gt;</code>&#x7684;&#x5B50;&#x7EC4;&#x4EF6;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">id</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x552F;&#x4E00;&#x6807;&#x8BC6;</td>
</tr>
<tr>
<td style="text-align:left">style</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6837;&#x5F0F;&#x58F0;&#x660E;</td>
</tr>
<tr>
<td style="text-align:left">class</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5F15;&#x7528;&#x6837;&#x5F0F;&#x8868;</td>
</tr>
<tr>
<td style="text-align:left">for</td>
<td style="text-align:left"><code>&lt;array&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6839;&#x636E;&#x6570;&#x636E;&#x5217;&#x8868;&#xFF0C;&#x5FAA;&#x73AF;&#x5C55;&#x5F00;&#x5F53;&#x524D;&#x6807;&#x7B7E;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">if</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6839;&#x636E;&#x6570;&#x636E;boolean&#x503C;&#xFF0C;&#x6DFB;&#x52A0;&#x6216;&#x79FB;&#x9664;&#x5F53;&#x524D;&#x6807;&#x7B7E;&#x3002;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0x8a000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">font-size</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">30px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x5C3A;&#x5BF8;</td>
</tr>
<tr>
<td style="text-align:left">font-style</td>
<td style="text-align:left">normal&#x3001;italic</td>
<td style="text-align:left">normal</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">font-weight</td>
<td style="text-align:left">normal&#x3001;bold</td>
<td style="text-align:left">normal</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">text-decoration</td>
<td style="text-align:left">underline&#x3001;line-through&#x3001;none</td>
<td style="text-align:left">none</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<h3 id="text">text</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x6587;&#x672C;&#x3002;</p>
<p>&#x6587;&#x672C;&#x5185;&#x5BB9;&#x5199;&#x5728;&#x6807;&#x7B7E;&#x5185;&#x5BB9;&#x533A;&#xFF0C;&#x652F;&#x6301;&#x8F6C;&#x4E49;&#x5B57;&#x7B26;&quot;&quot;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4EC5;&#x652F;&#x6301;<code>&lt;a&gt;</code>&#x4E0E;<code>&lt;span&gt;</code>&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">lines</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">-1</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x884C;&#x6570;&#xFF0C;-1&#x4EE3;&#x8868;&#x4E0D;&#x9650;&#x5B9A;&#x884C;&#x6570;</td>
</tr>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0x8a000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">font-size</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">30px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x5C3A;&#x5BF8;</td>
</tr>
<tr>
<td style="text-align:left">font-style</td>
<td style="text-align:left">normal&#x3001;italic</td>
<td style="text-align:left">normal</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">font-weight</td>
<td style="text-align:left">normal&#x3001;bold</td>
<td style="text-align:left">normal</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">text-decoration</td>
<td style="text-align:left">underline&#x3001;line-through&#x3001;none</td>
<td style="text-align:left">none</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">text-align</td>
<td style="text-align:left">left&#x3001;center&#x3001;right</td>
<td style="text-align:left">left</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">line-height</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x884C;&#x9AD8;</td>
</tr>
<tr>
<td style="text-align:left">text-overflow</td>
<td style="text-align:left">clip&#x3001;ellipsis</td>
<td style="text-align:left">clip</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5728;&#x8BBE;&#x7F6E;&#x4E86;&#x884C;&#x6570;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x751F;&#x6548;</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<h3 id="web">web</h3>
<h4 id="&#x6982;&#x8FF0;">&#x6982;&#x8FF0;</h4>
<p>&#x7528;&#x4E8E;&#x663E;&#x793A;&#x5728;&#x7EBF;&#x7684;html&#x9875;&#x9762;&#x3002;</p>
<h4 id="&#x5B50;&#x7EC4;&#x4EF6;">&#x5B50;&#x7EC4;&#x4EF6;</h4>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<h4 id="&#x5C5E;&#x6027;">&#x5C5E;&#x6027;</h4>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">src</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x9700;&#x8981;&#x52A0;&#x8F7D;&#x7684;&#x9875;&#x9762;&#x5730;&#x5740;</td>
</tr>
</tbody>
</table>
<h4 id="&#x4E8B;&#x4EF6;">&#x4E8B;&#x4EF6;</h4>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">pagestart</td>
<td style="text-align:left"><code>{url: urlString}</code></td>
<td style="text-align:left">&#x5F00;&#x59CB;&#x52A0;&#x8F7D;&#x7F51;&#x9875;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">pagefinish</td>
<td style="text-align:left"><code>{url: urlString, canBack: true/false, canForward: true/false}</code></td>
<td style="text-align:left">&#x7F51;&#x9875;&#x52A0;&#x8F7D;&#x5B8C;&#x6210;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">titlereceive</td>
<td style="text-align:left"><code>{title: title}</code></td>
<td style="text-align:left">&#x6536;&#x5230;&#x7F51;&#x9875;&#x6807;&#x9898;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
<tr>
<td style="text-align:left">error</td>
<td style="text-align:left"><code>{errorMsg: errorMsg}</code></td>
<td style="text-align:left">&#x7F51;&#x9875;&#x52A0;&#x8F7D;&#x51FA;&#x73B0;&#x9519;&#x8BEF;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
</tbody>
</table>
<h4 id="&#x65B9;&#x6CD5;">&#x65B9;&#x6CD5;</h4>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">reload</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x91CD;&#x65B0;&#x52A0;&#x8F7D;&#x9875;&#x9762;</td>
</tr>
<tr>
<td style="text-align:left">forward</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6D4F;&#x89C8;&#x5386;&#x53F2;&#x9875;&#x9762;&#x4E2D;&#x7684;&#x524D;&#x4E00;&#x4E2A;&#x9875;&#x9762;</td>
</tr>
<tr>
<td style="text-align:left">back</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x6D4F;&#x89C8;&#x5386;&#x53F2;&#x9875;&#x9762;&#x4E2D;&#x7684;&#x540E;&#x4E00;&#x4E2A;&#x9875;&#x9762;</td>
</tr>
<tr>
<td style="text-align:left">canForward</td>
<td style="text-align:left"><code>{callback: Function}</code></td>
<td style="text-align:left">&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x5411;&#x524D;&#x6D4F;&#x89C8;</td>
</tr>
<tr>
<td style="text-align:left">canBack</td>
<td style="text-align:left"><code>{callback: Function}</code></td>
<td style="text-align:left">&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x5411;&#x540E;&#x6D4F;&#x89C8;</td>
</tr>
</tbody>
</table>
<p>canForward &#x56DE;&#x8C03;&#x51FD;&#x6570;&#x8FD4;&#x56DE;&#x53C2;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x8FD4;&#x56DE;&#x503C;&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">canForward</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left">&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x5411;&#x524D;&#x6D4F;&#x89C8;</td>
</tr>
</tbody>
</table>
<p>canBack &#x56DE;&#x8C03;&#x51FD;&#x6570;&#x8FD4;&#x56DE;&#x53C2;&#x6570;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x8FD4;&#x56DE;&#x503C;&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">canBack</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left">&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x5411;&#x540E;&#x6D4F;&#x89C8;</td>
</tr>
</tbody>
</table>
<p>&#x793A;&#x4F8B;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">web</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;http://www.example.com/&quot;</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;web&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">web</span>&gt;</span>
</code></pre>
<pre><code class="lang-javascript"><span class="hljs-keyword">this</span>.$element(<span class="hljs-string">&apos;web&apos;</span>).canForward({
  callback: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">e</span>) </span>{
    <span class="hljs-keyword">if</span>(e) {
      <span class="hljs-comment">// &#x52A0;&#x8F7D;&#x5386;&#x53F2;&#x5217;&#x8868;&#x4E2D;&#x7684;&#x4E0B;&#x4E00;&#x4E2A; URL</span>
      <span class="hljs-keyword">this</span>.$element(<span class="hljs-string">&apos;web&apos;</span>).forward();
    } <span class="hljs-keyword">else</span> {
      <span class="hljs-comment">// TODO</span>
    }
  }.bind(<span class="hljs-keyword">this</span>)
});
</code></pre>
<h3 id="rating">rating</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x661F;&#x7EA7;&#x8BC4;&#x5206;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">numStars</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">5</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5426;&#x661F;&#x7EA7;&#x603B;&#x6570;</td>
</tr>
<tr>
<td style="text-align:left">rating</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x8BC4;&#x661F;&#x6570;</td>
</tr>
<tr>
<td style="text-align:left">stepSize</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0.5</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x8BC4;&#x661F;&#x6B65;&#x957F;</td>
</tr>
<tr>
<td style="text-align:left">indicator</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left">false</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x662F;&#x5426;&#x4F5C;&#x4E3A;&#x4E00;&#x4E2A;&#x6307;&#x793A;&#x5668;&#xFF08;&#x7528;&#x6237;&#x4E0D;&#x53EF;&#x64CD;&#x4F5C;&#xFF09;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">star-background</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x4EC5;&#x652F;&#x6301;&#x672C;&#x5730;&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td style="text-align:left">star-foreground</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x4EC5;&#x652F;&#x6301;&#x672C;&#x5730;&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td style="text-align:left">star-secondary</td>
<td style="text-align:left"><code>&lt;uri&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x4EC5;&#x652F;&#x6301;&#x672C;&#x5730;&#x8DEF;&#x5F84;</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#xFF0C;&#x4E0D;&#x652F;&#x6301;&#x70B9;&#x51FB;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>{rating: current rating}</code></td>
<td style="text-align:left">&#x8BC4;&#x661F;&#x6570;&#x53D1;&#x751F;&#x6539;&#x53D8;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="container.html" class="navigation navigation-prev " aria-label="Previous page: 容器组件">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="form.html" class="navigation navigation-next " aria-label="Next page: 表单组件">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"基础组件","level":"1.4.3","depth":2,"next":{"title":"表单组件","level":"1.4.4","depth":2,"path":"component/form.md","ref":"component/form.md","articles":[]},"previous":{"title":"容器组件","level":"1.4.2","depth":2,"path":"component/container.md","ref":"component/container.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"component/basics.md","mtime":"2018-02-25T08:39:46.908Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-03-21T12:50:57.603Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

